﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ChooseTest.aspx.cs" Inherits="RoleTest" %>

<%@ Register Assembly="TunyNet.Web.UI" Namespace="TunyNet.Web.UI" TagPrefix="Tunynet" %>
<%@ Register Assembly="ChinaCustoms.Qingdao.Workflow.Controls" Namespace="ChinaCustoms.Qingdao.Workflow.Controls" TagPrefix="WFU" %>
<link type="text/css" href="Utility/TunyNet_Web_UI/Modal/css/Modal.css" rel="stylesheet" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>角色测试</title>

    <script language="javascript" type="text/javascript">
<!--
    function getNextStepRole(result)
    {
	    if (result != null)
	    {
		    document.getElementById('<%= NextStepRoleLabel.ClientID %>').innerHTML = result;
		    document.getElementById('<%= NextStepRoleHidden.ClientID %>').value = result;
	    }
    }
    
    function getNextStepExecutor(result)
    {
	    if (result != null)
	    {
		    arr=result.split("|");
		    document.getElementById('<%= NextStepExecutorLabel.ClientID %>').innerHTML = arr[0];
		    document.getElementById('<%= NextStepExecutorHidden.ClientID %>').value = arr[1];
	    }
    }
    
    function getOrganizationsOfSubFlow(result)
    {
	    if (result != null)
	    {
	        arr=result.split("|");
		    document.getElementById('<%= SubFlowNextStepOrganizationsLabel.ClientID %>').innerHTML = arr[0];
		    document.getElementById('<%= SubFlowNextStepOrganizationsHidden.ClientID %>').value = arr[1];
	    }
    }
//-->
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div style="height: 500">
        <Tunynet:Modal ID="Modal1" runat="server" CssClasses="commonModal" TitleCssClasses="commonModalTitle"
            CloseCssClasses="commonModalClose" ContentCssClasses="commonModalContent" FooterCssClasses="commonModalFooter"
            ResizeCssClasses="commonModalResize" MaskCssClasses="commonModalMask" LoadingUrl="~/Utility/loading.htm" />
        <asp:Label runat="server" ID="NextStepRoleLabel" />
        <input type="hidden" id="NextStepRoleHidden" runat="server" name="NextStepRoleHidden" />
        <WFU:ModalLink runat="server" ID="SelectRole" Text="选择角色" DestinationURL="~/Utility/RoleSelector.aspx"
            CallBack="getNextStepRole"></WFU:ModalLink>
        <asp:Label runat="server" ID="NextStepExecutorLabel" />
        <input type="hidden" id="NextStepExecutorHidden" runat="server" name="NextStepExecutorHidden" />
        <WFU:ModalLink runat="server" ID="SelectExecutor" Text="选择人员" DestinationURL="~/Utility/UserSelector.aspx?RoleNames=SUPER&OrganizationIDs="
            CallBack="getNextStepExecutor"></WFU:ModalLink>
        <asp:Label runat="server" ID="SubFlowNextStepOrganizationsLabel"/>
        <a style="background-color:Gray"></a>
        <input type="hidden" id="SubFlowNextStepOrganizationsHidden" runat="server" name="SubFlowNextStepOrganizationsHidden" />
        <WFU:ModalLink runat="server" ID="SubFlowSelectOrganizations" CallBack="getOrganizationsOfSubFlow"
            DestinationURL="~/Utility/OrganizationSelector.aspx?IsOnlyDisplayRelativeTopLevel=true"
            Text="选择部门" />
        <asp:Button ID="测试数据库链接" runat="server" Text="测试数据库链接" OnClick="测试数据库链接_Click" />
    </div>
    <hr />
    </form>
</body>
</html>
